home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / jbhost51.zip / JBHOST.MAC < prev    next >
Text File  |  1991-12-21  |  27KB  |  611 lines

  1. Welcome to the COMMO HOST MODE version 5.1
  2. Written by Jeff Bishop
  3. Released to the public domain.
  4.  
  5. NOTE:   Some parts of this host have been developed from the MOSTHOST
  6.         package.  These include the autobaud detection and the chat mode.  ALL
  7.         other parts are original.  Credit is due in great appreciation to the
  8.         MOSTHOST author.
  9.  
  10. The next section of this macro contains all of the setup variables
  11. required.  Change the name and passwords before running the host.
  12. To use Zmodem or Ymodem make sure that DSZ.COM is in your DOS path.
  13. Xmodem is internal to COMMO.
  14.  
  15. Some external programs are required.  These are: RV 2.42,
  16. DOORWAY 2.21, HSLINK 10D5 and DSZ/GSZ. Please make sure that the options you
  17. use from the menu have the supporting programs or else COMMO macro errors
  18. will occur.
  19.  
  20. The supporting programs are registered trademarks of their respective
  21. corporations.
  22.  
  23. ********************************************************************************
  24. The following section sets up the necessary variables and options for the
  25. JBHOST. Please make sure that these are set to your appropriate
  26. settings.
  27. ********************************************************************************
  28.  
  29. {:setup}   {sete quit}
  30.            {setv autobaud,Y}           Allow autobaud detection
  31.            {setv dpass,shell}          DOS PASSWORD for DOS menu
  32.            {setv i_time,0}             Inactive timeout setting
  33.            {setv level,0}              level for new users, 0=basic, 1=sysop level
  34.            {setv minutes,0}            Allowed minutes online (0 means no limit)
  35.            {setv pdir,c:\com\}       DSZ DRIVER DIRECTORY
  36.            {SETV sdir,C:\COM}        STARTING DIRECTORY
  37.            {setv spass,shutdown}       Regular shutdown password
  38.            {EXEC CD %sdir} {setv sdir} Change to startup directory
  39.  
  40. ********************************************************************************
  41. The next section starts the main body of the host mode.
  42. ********************************************************************************
  43.  
  44. {:HOST}    {setv novice,Y} {loca N} {spoc Y} {SEND AT|} {paus 2}
  45. {:HOST2}   {loca n} {clea}
  46.            {disp 1,1,,^(COMMO^) is in Host Mode.}
  47.            {disp 2,1,,^(ESC^) to halt the host.}
  48.            {disp 3,1,,^(1^)   for local login mode.}
  49.            {disp 4,1,,^(2^)   to go to main menu locally}
  50.            {disp 5,1,,^(3^)   to view scroll back buffer}
  51.            {disp 6,1,,^(4^)   to change time limit allowed online}
  52.            {disp 7,1,,^(5^)   Set Timeout value}
  53.            {disp 8,1,,^(q^)   to exit host.} {disp 9,1}
  54.  
  55. ********************************************************************************
  56. The next section handles the processing of the ring/options entered.
  57. ********************************************************************************
  58.  
  59. {:rng1}    {setg 0,,L} {setv rng} {gets rng,6,rng1}
  60.            {comp rng,1} {ifco sysop}
  61.            {comp rng,2} {ifco dolocal}
  62.            {comp rng,3} {ifco dscroll}
  63.            {comp rng,4} {ifco limit}
  64.            {comp rng,5} {ifco timeset}
  65.            {comp rng,q} {ifco quit2}
  66.            {comp rng,RING} {ifco ,host}
  67.  
  68. ********************************************************************************
  69. Answer the phone and process connect.
  70. ********************************************************************************
  71.  
  72. {:rang}    {SEND ^J^M~ATA^J^M~}
  73.            {SETL 45,host}
  74.            {GOLO C300,CONNECT^M}
  75.            {GOLO C120,CONNECT 1200^M}
  76.            {GOLO C240,CONNECT 2400^M}
  77.            {GOLO C480,CONNECT 4800^M}
  78.            {GOLO C960,CONNECT 9600^M}
  79.            {GOLO C192,CONNECT 19200^M}
  80.            {LOOK CONNECT 38400^M}
  81.            {SETV mspeed,38400} {GOTO waitout}
  82. {:C300}    {SETV mspeed,300}  {GOTO waitout}
  83. {:C120}    {SETV mspeed,1200} {GOTO waitout}
  84. {:C240}    {SETV mspeed,2400} {GOTO waitout}
  85. {:C480}    {SETV mspeed,4800} {GOTO waitout}
  86. {:C960}    {SETV mspeed,9600} {GOTO waitout}
  87. {:C192}    {SETV mspeed,19200}
  88. {:waitout} {comp autobaud,n} {ifco WO1} {PARM %mspeed}
  89. {:WO1}     {setv rng} {setv mspeed} {setv tmp} {goto getuser}
  90.  
  91. {:dscroll} {spoc N} {scroll} {goto host2}
  92. {:dolocal} {spoc N} {loca Y} {elap}
  93.            {setv rng} {setv username,SYSOP} {setv ulevel,1} {goto menu2}
  94.  
  95. ********************************************************************************
  96. This routine will be executed if the LIMIT option is selected.
  97. ********************************************************************************
  98.  
  99. {:limit}   {clea} {setv minutes,0} 
  100.            {input minutes,Enter the number of minutes allowed online}
  101.            {goto host2}
  102.  
  103. ********************************************************************************
  104. This routine handles the shutting down of the host mode.
  105. ********************************************************************************
  106.  
  107. {:quit}    {call cls} {send Shutting down the host^M^J} {call pk}
  108. {:quit2}   {ifca ,quitgo} {elap} {hang Y} {paus 2}
  109. {:quitgo}  {spoc y} {loca n} {setv user} {setv dpass} {setv spass}
  110.            {setv minutes} {setv opt} {setv pdir} {setv NOVICE} {setv i_time}
  111.            {setv autobaud} {setv username} {setv ulevel} {setv level}
  112.            {clea} {macl commo.mac} {}
  113. {:sysop}   {setv rng} {spoc N} {goto getuser}
  114. {:timeset} {clea} {setv i_time,0}
  115.            {input i_time,Enter the number of seconds to allow before timeout? }
  116.            {goto host2}
  117.  
  118. ********************************************************************************
  119. The next set of routines handles the logging in of users.
  120. ********************************************************************************
  121.  
  122. {:getuser} {elap} {loca y} {call cls}
  123.            {ifex %_HOM%jbusers,,newuser}
  124.            {send Welcome to the ^(COMMO^) host mode^M^J^M^J}
  125. {:ul}      {setv y,0} {setg %i_time,tout,y,^M^J}
  126. {:t0}      {setv username}
  127.            {send Enter 'NEW' for new user^M^J^M^Jusername: }
  128.            {gets username,20}
  129.            {comp username,new} {ifco newuser}
  130.            {call chk_usr}
  131.            {comp uflag,Y} {ifco gpass}
  132.            {incr Y} {comp-ge y,3} {ifco wuser}
  133.            {send ^M^J^GWrong Entry^M^J} {goto t0}
  134. {:wuser}   {setv username} {setv y}
  135.            {call cls} {call wcerr} {goto host}
  136. {:gpass}   {call entrpas} {comp pflag,Y} {ifco menu,host}
  137.  
  138. ********************************************************************************
  139. This routines accepts a password and verifies it.
  140. ********************************************************************************
  141.  
  142. {:entrpas} {setv pflag,Y} {call cls} {setv y,0}
  143. {:t1}      {send Password: }
  144.            {SETV tmp} {setg %i_time,tout,Y,^M^J}
  145.            {gets-Hp tmp,20}
  146.            {comp tmp,%password} {ifco xentrps}
  147.            {incr Y} {comp Y,3} {ifco wpass}
  148.            {send ^M^JTry again^m^j} {goto t1}
  149. {:wpass}   {call wcerr} {setv pflag,N}
  150. {:xentrps} {setv tmp} {setv y} {retu}
  151.  
  152. ********************************************************************************
  153. This routine handles new users comming into the system.
  154. ********************************************************************************
  155.  
  156. {:newuser} {call cls}
  157.            {send Welcome to the new user ^(COMMO^) Host mode screen^M^J}
  158. {:new1}    {send Please enter your name: }
  159.            {setv username} {setg %i_time,tout,Y,^M^J}
  160.            {gets username,20} {comp username} {ifco new1}
  161. {:new2}    {send ^M^JEnter password: }
  162.            {setv pass} {setg %i_time,tout,Y,^M^J}
  163.            {gets-Hp pass,20}
  164.            {comp pass} {ifco new2}
  165. {:new3}    {send ^M^JVerify Password: }
  166.            {setv pass2}
  167.            {setg %i_time,tout,Y,^M^J}
  168.            {gets-Hp pass2,20}
  169.            {comp pass2} {ifco new3}
  170.            {comp pass,%pass2} {ifco yusr}
  171.            {call wcerr} {goto newuser}
  172. {:yusr}    {call cls}
  173.            {send thank you, writing new user information to disk ...}
  174.            {wope-a1 %_hom%jbusers} {writ %username} {writ %pass}
  175.            {writ %novice} {writ %level}
  176.            {wclo} {setv pass} {setv pass2} {setv uflag,Y} {call pk}
  177.            {setv ulevel,0} {goto menu}
  178.  
  179. **************************